﻿using System;
using System.Runtime.InteropServices;

namespace Ast.Core.WinApi.IpHlpApi
{
    public static class IpHelpNative
    {
        [DllImport("iphlpapi.dll", SetLastError = true)]
        public static extern uint GetExtendedTcpTable(
            IntPtr pTcpTable,
            ref int dwOutBufLen,
            bool sort,
            int ipVersion,
            IpHelpConstant.TcpTableClass tblClass,
            int reserved
            );

        [DllImport("iphlpapi.dll", SetLastError = true)]
        public static extern uint GetExtendedUdpTable(
            IntPtr pTcpTable,
            ref int dwOutBufLen,
            bool sort,
            int ipVersion,
            IpHelpConstant.UdpTableClass tblClass,
            int reserved
            );
    }
}